<?php
/*------------------------------------------------------------------------
 # SM ParallaxSlider - Version 1.0
 # Copyright (c) 2013 YouTech Company. All Rights Reserved.
 # @license - Copyrighted Commercial Software
 # Author: YouTech Company
 # Websites: http://www.magentech.com
-------------------------------------------------------------------------*/
$baseUrl = str_replace('https:', 'http:', str_replace('/index.php/', '', $this->getBaseURL()));
$options = $this->getConfigObject();
$smarthelper= Mage::helper('dynamicslideshow/utils');
$suffix = rand().time();
$tag_id = 'dynamicslideshow_'.$suffix;
echo $this->getScriptTags();
if( $options->pause == 1 ){
	$hover = 'on';
}else {
	$hover = 'off';
}
if ( $options->shownavigation == 1 ){
	$bullet = "bullet";
}else {
	$bullet = "none";
}
?>
	<?php if( Mage::getSingleton('cms/page')->getIdentifier() == 'home-left'  && 
	Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) {
		$start_width = 870;
		$start_height = 372;
		
	} elseif( Mage::getSingleton('cms/page')->getIdentifier() == 'home-v1'  && 
	Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) {
		$start_width = 590;
		$start_height = 551;
	} else{
		$start_width = 1170;
		$start_height = 500;
	}?>
<link href='http://fonts.googleapis.com/css?family=Share' rel='stylesheet' type='text/css' />
	<?php if( $options->pretext != "" ) { ?>
		<div class="pre-text"><?php echo $options->pretext; ?></div>
	<?php } ?>
	<div class="dynamicslideshow-container dynamicslideshow-loading <?php if( $options->shownavigation_when == 'alway' ){echo ' alway';}?>" id="<?php echo $tag_id;?>">
		<div class="bg-loading"></div>
		<div class="dynamicslideshow fullwidthbanner">
			<ul>
				<?php if( $options->slider1 !="" ){
					//echo $options->slider1;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider1);
				}
				if( $options->slider2 !=""){
					//echo $options->slider2;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider2);
				}
				if( $options->slider3 !=""){
					//echo $options->slider3;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider3);
				}
				if( $options->slider4 !=""){
					//echo $options->slider4;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider4);
				}
				if( $options->slider5 !=""){
					//echo $options->slider5;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider5);
				}
				if( $options->slider6 !=""){
					//echo $options->slider6;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider6);
				}
				if( $options->slider7 !=""){
					//echo $options->slider7;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider7);
				}
				if( $options->slider8 !=""){
					//echo $options->slider8;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider8);
				}
				if( $options->slider9 !=""){
					//echo $options->slider9;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider9);
				}
				if( $options->slider10 !=""){
					//echo $options->slider10;
					echo str_replace('<img src="', '<img src="'.$baseUrl.'/', $options->slider10);
				}?>
			</ul>
            <?php if( $options->timer_show == 1 ){?>
			<div class="tp-bannertimer <?php if( $options->timer_position == "under" ){ echo " tp-bottom";}?>"></div>
			<?php } ?>			
		</div>
	</div>
	<?php if( $options->posttext != "" ) {  ?>
		<div class="post-text"><?php echo $options->posttext; ?></div>
	<?php }?>
<script type="text/javascript">
	//jQuery(document).ready(function($) {
	jQuery(window).load(function() {
	jQuery('.dynamicslideshow-container').removeClass('dynamicslideshow-loading');
	if (jQuery.fn.cssOriginal!=undefined)
		jQuery.fn.css = jQuery.fn.cssOriginal;
	jQuery('#<?php echo $tag_id;?> > .dynamicslideshow').revolution(
		{
			delay:<?php echo $options->interval;?>,
			startheight:<?php echo $start_height;?>,
			startwidth:<?php echo $start_width;?>,
			hideThumbs:200,
			thumbWidth:100,							// Thumb With and Height and Amount (only if navigation Tyope set to thumb !)
			thumbHeight:50,
			thumbAmount:5,
			navigationType:"<?php echo $bullet;?>",				// bullet, thumb, none
			navigationArrows:"<?php echo $options->navigationArrows;?>",			// nexttobullets, solo (old name verticalcentered), none
			navigationStyle:"<?php echo $options->button_style;?>",				// round,square,navbar,round-old,square-old,navbar-old, or any from the list in the docu (choose between 50+ different item),
			navigationHAlign:"<?php echo $options->navigationhalign;?>",				// Vertical Align top,center,bottom
			navigationVAlign:"<?php echo $options->navigationvalign;?>",					// Horizontal Align left,center,right
			navigationHOffset:0,
			navigationVOffset:20,
			soloArrowLeftHalign:"left",
			soloArrowLeftValign:"center",
			soloArrowLeftHOffset:20,
			soloArrowLeftVOffset:0,
			soloArrowRightHalign:"right",
			soloArrowRightValign:"center",
			soloArrowRightHOffset:20,
			soloArrowRightVOffset:0,
			touchenabled:"on",						// Enable Swipe Function : on/off
			onHoverStop:"<?php echo $hover;?>",						// Stop Banner Timet at Hover on Slide on/off
			stopAtSlide:<?php if( $options->play == 1 ){ echo '-1';}else{ echo '1';}?>,							// Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
			stopAfterLoops:0,						// Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic
			hideCaptionAtLimit:0,					// It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser)
			hideAllCaptionAtLilmit:0,				// Hide all The Captions if Width of Browser is less then this value
			hideSliderAtLimit:0,					// Hide the whole slider, and stop also functions if Width of Browser is less than this value
			shadow:0,								//0 = no Shadow, 1,2,3 = 3 Different Art of Shadows  (No Shadow in Fullwidth Version !)
			fullWidth:"off"							// Turns On or Off the Fullwidth Image Centering in FullWidth Modus			
		});
});
</script>
